<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>文本框输入检查</title>
    <style>
        #message {
            color: red;
        }
    </style>
</head>
<body>
    <h1>输入检查</h1>
    <input type="text" id="aa5" placeholder="请输入答案">
    <button onclick="aa6()">提交</button>
    <p id="message"></p>

    <script>
        function aa6() {
            const aa5 = document.getElementById('aa5');
            const message = document.getElementById('message');
            const inputValue = aa5.value.trim();

            if (inputValue === '5') {
                message.textContent = "输入是对的！";
                message.style.color = "green";
            } else {
                message.textContent = "输入是错的！";
                message.style.color = "red";
            }
        }
    </script>
</body>
</html>